package com.nebula.api.modules.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nebula.api.modules.product.entity.ShopProduct;
import com.nebula.api.modules.product.qo.ProductForm;
import com.nebula.api.modules.product.vo.ProductVo;
import com.nebula.api.modules.product.vo.ShopProductVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商品(单个商品,有库存量,例如iphone10,内存是256G,尺寸是9.6寸) Mapper 接口
 * </p>
 *
 * @author my
 * @since 2022-09-17
 */
public interface ShopProductMapper extends BaseMapper<ShopProduct> {

    /**
     * 查询首页数据
     *
     * @return
     * @Param("type") :起别名   type:1,精品  2，热门
     */
    public List<ShopProductVo> selectProduct(@Param("type") Integer type);

    /*商品搜索
     * */
    public List<ShopProductVo> selectProductList(Page page, @Param("productForm") ProductForm productForm);
}
